-- CopyButtonToHome, Copyright by Mac Help Co., January 1988
-- by Chris Hostetter, Mac Help Co., 1800 East Market Street
-- Long Beach, CA 90805, (213) 428-7414
-- The script for this button is copyrighted and may not be
-- used without the written permission of the author (above).
end copyright
on "CopyButtonToHome"
beep
answer "Do you want to copy this button to your Home Card?" with "Yes" or "Cancel"
if it is "Cancel" then exit "CopyButtonToHome"
set cursor to 4
set userlevel to 5
get the userlevel
put it into OldUserLevel
if it < 4 then
answer "Set level to 'Authoring' for this Stack OR" && "Home Preferences Card."
exit CopyButtonToHome
end if
put the short name of this stack into StackName
choose button tool
click at the loc of card button "Click to copy to Home"
doMenu "Copy Button"
push card
push card
go home
doMenu "Paste Button"
set the loc of card button "Click to copy to Home" to 354,294
set the style of card button "Click to copy to Home" to transparent
set the name of card button "Click to copy to Home" to StackName
choose browse tool
set lockscreen to true
pop card
pop card
set the userLevel to OldUserLevel
end "CopyButtonToHome"
-- part 1 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=272 top=32 right=81 bottom=387
-- title width / last selected line: 0
-- icon id / first selected line: 12601 / 12601
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Click to copy to home
----- HyperTalk script -----
on mouseUp
if the short name of this stack is "Home" then
put the short name of the target into thisName
visual effect dissolve to black
-- Go to the name of the stack
go to stack thisName
else
CopyButtonToHome
end if
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=272 top=95 right=144 bottom=387
-- title width / last selected line: 0
-- icon id / first selected line: 9236 / 9236
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Click to copy to home
----- HyperTalk script -----
on mouseUp
if the short name of this stack is "Home" then
put the short name of the target into thisName
visual effect dissolve to black
-- Go to the name of the stack
go to stack thisName
else
CopyButtonToHome
end if
end mouseUp
-- part contents for background part 8
----- text -----
Card 5 of 20
-- part contents for background part 9
----- text -----
COPY BUTTON to Home Card
This feature allows you to put an icon that you designed (using ResEdit or an icon making program) into your stack. When someone buys your stack, they might want the icon on their home card. These scripts allow the user simply to click on your icon and it will automatically be pasted on to their home card.
This feature includes two scripts. One script is in the button itself. If you have an icon of your own, put this script into your icon which is pasted on to your card.
Your icon must be pasted on the card, not on the background.
The other script is located in the script area of the card (see Menu Item: Card Info). The name of this script is "CopyButtonToHome"